package com.quatrix.openphantasy.client.ui;

import com.quatrix.openphantasy.client.datasource.CountryDS;
import com.quatrix.openphantasy.client.datasource.TeamDS;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.PropertySheet;
import com.smartgwt.client.widgets.form.fields.SelectItem;

public class TeamForm extends DynamicForm {

	TeamForm() {
		setDataSource(TeamDS.getInstance());
		setUseAllDataSourceFields(true);
		SelectItem country = new SelectItem("country");
		country.setName("country");
		country.setOptionDataSource(CountryDS.getInstance());
		country.setDisplayField("name");
		country.setValueField("code");
		setFields(country);
		
	}
	
	public static TeamForm createWidget() {
		return new TeamForm();
	}
}
